package com.cloud.sso.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class AppSaveDto {

    private String id;

    @NotNull(message = "应用名称不能为空")
    private String appName;

    @NotNull(message = "应用id不能为空")
    private String clientId;

    @NotNull(message = "应用密钥不能为空")
    private String clientSecret;

    private String resourceIds;

    private String scope = "all";

    @NotNull(message = "授权类型不能为空")
    private List<String> grantType;
    @NotNull(message = "回调地址不能为空")
    private String redirectUri;

    // 是否自动授权
    private Integer autoApprove = 1;

    // access_token有效时间
    private Integer accessTokenValiditySecond = 300;

    // refresh_token有效时间
    private Integer refreshTokenValiditySecond = 36000;

}
